﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DesignPattern.MementoPattern
{
    class Program
    {
        static void Main(string[] args)
        {
            Originator o = new Originator();
            o.State = "On";
            o.Show();

            Caretaker c = new Caretaker();
            c.Mememto = o.CreateMemento();

            o.State = "Off";
            o.Show();
            o.SetMemento(c.Mememto);
            o.Show();

            Console.ReadKey();
        }
    }
}
